package com.yfp.operation.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yfp.operation.domain.DeviceCurrentComboPlanRoadDO;
import com.yfp.operation.domain.DeviceCurrentComboStockDO;
import com.yfp.operation.domain.dto.DamageDTO;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @description 针对表【device_current_combo_stock】的数据库操作Service
 * @createDate 2024-04-24 15:36:52
 */
public interface DeviceCurrentComboStockService extends IService<DeviceCurrentComboStockDO> {

    /**
     * 获取当前设备下所有套餐
     *
     * @param damageDTOS
     * @return
     */
    List<DeviceCurrentComboStockDO> listStock(List<DamageDTO> damageDTOS);

    /**
     * 报损处理
     *
     * @param damageDTOS
     * @return
     */
    List<DeviceCurrentComboPlanRoadDO> damageHandle(List<DamageDTO> damageDTOS);


    DeviceCurrentComboStockDO selectByMachineIdAndComboId(String machineId, String comboId);

    void deleteByMachineId(String deviceId);

    void insert(DeviceCurrentComboStockDO v);

    void updateStock(DeviceCurrentComboStockDO aDo);

    void batchUpdate(ArrayList<DeviceCurrentComboStockDO> dccsList);

    void insertAll(List<DeviceCurrentComboStockDO> dccsList);

    /**
     * 获取当前线上库存
     * @param machineId
     * @return
     */
    List<DeviceCurrentComboStockDO> getByMacineId(String machineId);
}
